function showMapButtons(){					///////////////////////////////////////////
	for (var t=0; t<4; t++){				// This function shows the map buttons   //
		showLayer("MapButton" + (t+1));		// and other map stuff once the map      //
	}										// button has been pressed.              //
	showLayer("Map");						///////////////////////////////////////////
}

function hideMapButtons(){					///////////////////////////////////////////
	for (var t=0; t<4; t++){				// This function hides the map buttons   //
		hideLayer("MapButton" + (t+1));		// and other map stuff once the another  //
	}										// button has been pressed.              //
	hideLayer("Map");						///////////////////////////////////////////
	hideLayer("GButton1");
	hideLayer("GButton2");
	hideLayer("GButton3");
	hideLayer("ManButton1");
	hideLayer("ManButton2");
	hideLayer("OffButton1");
	hideLayer("OffButton2");
	hideLayer("OffButton3");
	hideLayer("CCButton1");
	hideLayer("CCButton2");
	hideLayer("CCButton3");
	hideLayer("UButton1");
	hideLayer("UButton2");
	hideLayer("FUButton1");
	hideLayer("FUButton2");
	hideLayer("CSSButton1");
	hideLayer("CSSButton2");
	hideLayer("CSSButton3");
	hideLayer("Arrow1");
	hideLayer("Arrow2");
	hideLayer("Boxes1a");
	hideLayer("Boxes1b");
	hideLayer("Boxes1c");
	hideLayer("Boxes2");
	hideLayer("Line1");
	hideLayer("Line2");
	hideLayer("Line3");
	hideLayer("Line4");
	hideLayer("Line5");
	hideLayer("Line6");
	hideLayer("Line7");
	hideLayer("Line8");
	hideLayer("Line8a");
	hideLayer("Word1");
	hideLayer("Word2");
	hideLayer("Word1a");
	hideLayer("Word2a");
	hideLayer("Word3");
	hideMaps();
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function buttonMO(num){
	buttonRefArray[num].src = mainButtonImgArray[num][1].src;
}

function buttonMOut(num){
	buttonRefArray[num].src = mainButtonImgArray[num][0].src;
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function MOMap(num){
	if (num == 1){
		showLayer("ManButton1");
		showLayer("ManButton2");
		showLayer("ManCover");
	}
	else if (num == 2){
		showLayer("CCButton1");
		showLayer("CCButton2");
		showLayer("CCButton3");
		showLayer("CCCover");
	}
	else if (num == 3){
		showLayer("UButton1");
		showLayer("UButton2");
		showLayer("UCover");
	}
	else if (num == 4){
		showLayer("CSSButton1");
		showLayer("CSSButton2");
		showLayer("CSSButton3");
		showLayer("CSSCover");
	}
}

function MOGroup(num){
	if (num == 1){
		showLayer("GButton1");
		showLayer("GButton2");
		showLayer("GButton3");
		showLayer("GCover");
		hideLayer("OffButton1");
		hideLayer("OffButton2");
		hideLayer("OffButton3");
	}
	else if (num == 2){
		hideLayer("GButton1");
		hideLayer("GButton2");
		hideLayer("GButton3");
		showLayer("OffButton1");
		showLayer("OffButton2");
		showLayer("OffButton3");
		showLayer("OffCover");
	}
	else if (num == 3){
		showLayer("FUButton1");
		showLayer("FUButton2");
		showLayer("FUCover");
	}
}

function hideManGroup(num){
	if (num == 1){
		hideLayer("ManButton1");
		hideLayer("ManButton2");
		hideLayer("GButton1");
		hideLayer("GButton2");
		hideLayer("GButton3");
		hideLayer("GCover");
		hideLayer("OffButton1");
		hideLayer("OffButton2");
		hideLayer("OffButton3");
	}
	else if (num == 2){
		hideLayer("ManButton1");
		hideLayer("ManButton2");
		hideLayer("GButton1");
		hideLayer("GButton2");
		hideLayer("GButton3");
		hideLayer("GCover");
	}
	else if (num == 3){
		hideLayer("ManButton1");
		hideLayer("ManButton2");
		hideLayer("OffButton1");
		hideLayer("OffButton2");
		hideLayer("OffButton3");
		hideLayer("OffCover");
	}
	else if (num == 4){
		hideLayer("CCButton1");
		hideLayer("CCButton2");
		hideLayer("CCButton3");
		hideLayer("CCCover");
	}
	else if (num == 5){
		hideLayer("UButton1");
		hideLayer("UButton2");
		hideLayer("FUButton1");
		hideLayer("FUButton2");
		hideLayer("UCover");
		hideLayer("FUCover");
	}
	else if (num == 6){
		hideLayer("CSSButton1");
		hideLayer("CSSButton2");
		hideLayer("CSSButton3");
		hideLayer("CSSCover");
	}
}

function hideUs(){
	hideLayer("FUButton1");
	hideLayer("FUButton2");
	hideLayer("FUCover");
}

function hideSubButtons(){
	hideLayer("ManButton1");
	hideLayer("ManButton2");
	hideLayer("ManCover");
	hideLayer("GButton1");
	hideLayer("GButton2");
	hideLayer("GButton3");
	hideLayer("GCover");
	hideLayer("OffButton1");
	hideLayer("OffButton2");
	hideLayer("OffButton3");
	hideLayer("OffCover");
	hideLayer("CCButton1");
	hideLayer("CCButton2");
	hideLayer("CCButton3");
	hideLayer("CCCover");
	hideLayer("UButton1");
	hideLayer("UButton2");
	hideLayer("UCover");
	hideLayer("FUButton1");
	hideLayer("FUButton2");
	hideLayer("FUCover");
	hideLayer("CSSButton1");
	hideLayer("CSSButton2");
	hideLayer("CSSButton3");
	hideLayer("CSSCover");
}

function popCmdrGud(task){
	if (task == "show"){
		showLayer("CmdrGud1");
		showLayer("CmdrGud2");
	}
	else{
		hideLayer("CmdrGud1");
		hideLayer("CmdrGud2");
	}
}

function popInst(task){
	if (task == "show"){
		showLayer("Instruct1");
		showLayer("Instruct2");
	}
	else{
		hideLayer("Instruct1");
		hideLayer("Instruct2");
	}
}

function hideMaps(){
	for (var f=0; f<10; f++){
		hideLayer("Map" + (f+1));
	}
}


